package src.lab02.text17;

/**
 * Created by HASEE on 2017/10/26.
 */
public class Text {
    public static void main(String[] args) {
        int[] numbers = new int[10];
        numbers[0] = 12;
        numbers[1] = 2;
        numbers[2] = 21;
        numbers[3] = 5;
        numbers[4] = 7;
        numbers[5] = 9;
        numbers[6] = 17;
        numbers[7] = 19;
        numbers[8] = 20;
        numbers[9] = 18;

int index;
for (index=0;index<numbers.length;index++)

        System.out.println(numbers[index]);
int sum=0;
int i;
for (i=0;i<numbers.length;i++)
        {
           sum +=numbers[i];}
        System.out.println("总和是："+sum);
    }
}
